﻿class cn.eminia.AS2.Util_MC {
	function Util_MC() {
	}
	static function setDepth(eArr:Array) {
		var ddarr = [];
		for (var i = 0; i<eArr.length; i++) {
			var oo = eArr[i];
			ddarr.push(oo.getDepth());
		}
		//trace(ddarr);
		ddarr.sort(16);
		ddarr.reverse();
		for (var i = 0; i<eArr.length; i++) {
			var oo = eArr[i];
			oo.swapDepths(ddarr[i]);
		}
		//trace(ddarr);
	}
	static function goRan(who:MovieClip, id:Number) {
		who.gotoAndStop(cn.eminia.AS2.Util_Math.getSingleRan(who._totalframes, id)+1);
	}
}
